package com.neusoft.demo4;

public class Swallow extends Bird {
    public void fly() {
        System.out.println(this.getName() + "正在飞翔......");
    }
    public static void main(String[] args) {
        Swallow swallow = new Swallow(); //创建子类的对象
        swallow.setName("小燕子");
        swallow.setColor("黑色");
        swallow.eat();
        swallow.fly();

    }

}
